Lua API

Iter module

Various iterators.

Usage

local Iter = ELONA.require("core.Iter")

Functions

rectangle_iter (x, y, sx, sy) Iterates over positions in a rectangle.

Functions

# rectangle_iter (x, y, sx, sy)

Iterates over positions in a rectangle.

Parameters:
  • x : (num) starting x position
  • y : (num) starting y position
  • sx : (num) ending x position
  • sy : (num) ending y position
Usage:
for pos in Iter.rectangle_iter(10, 10, 20, 20) do
    Item.create(pos.x, pos.y, "core.putitoro", 1)
end